Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Rendering pages on browser when Instance i18n finished initiali… #2306

Closed
wants to merge 1 commit into from

Conversation

zakudriver
Copy link

@zakudriver zakudriver commented Dec 5, 2024

Rendering pages on browser when Instance i18n finished initialization completely.

Rendering pages after loading resources of backend to resolve error Text content does not match server-rendered HTML on NEXT.

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • commit message and code follows the Developer's Certification of Origin

Checklist (for documentation change)

  • only relevant documentation part is changed (make a diff before you submit the PR)
  • motivation/reason is provided
  • commit message and code follows the Developer's Certification of Origin

…zation completely

Rendering pages after loading resources of backend to resolve error `Text content does not match server-rendered HTML` on NEXT.
@adrai
Copy link
Member

adrai commented Dec 5, 2024

Can you mention this in the readme?

@zakudriver
Copy link
Author

To deal with the error happens on example /auto-static

@adrai
Copy link
Member

adrai commented Dec 5, 2024

which error? is there an issue? can you provide the link to the github issue?

@adrai
Copy link
Member

adrai commented Dec 5, 2024

@zakudriver
Copy link
Author

zakudriver commented Dec 5, 2024

screenshot-20241205-173238

@adrai
Copy link
Member

adrai commented Dec 5, 2024

@NamPNQ can you review and have a look at this? It's your example ;-)
@zakudriver fix this: https://github.com/i18next/next-i18next/actions/runs/12176576574/job/33962675076?pr=2306

@adrai
Copy link
Member

adrai commented Dec 5, 2024

btw: your change will remove that warning, but will introduce this warning: "react-i18next:: You will need to pass in an i18next instance by using initReactI18next Error Component Stack"

@NamPNQ
Copy link
Contributor

NamPNQ commented Dec 5, 2024

@zakudriver Can you update the example too?

From your code

    const [ready, setReady] = useState<boolean>(
      !configOverride?.clientAwaitInit
    )

If we set clientAwaitInit = true, so the server side don't translated? And I think it's not the target for auto-static, it should translate on server-side too

@zakudriver
Copy link
Author

Yeah. You are right, I will close this pr. thx. ;)

@zakudriver zakudriver closed this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants